<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8"/>

    <title>原生与js互调</title>

    <script type="text/javascript">

            function alertMsg(message) {
                alert(message);
            }

            function nativeMethod(message) {
                ContactInfo.getNativeMsg(message);
            }

    </script>
</head>
<body>
    <p>
        <a href="https://www.baidu.com">这是一段文字</a>
    </p>

    <!-- js调用原生的Buttion -->
    <button type="button" onclick="ContactInfo.getNativeMsg('JS调用原生方法-1');">JS调用原生方法—1</button>
    <br/>
    <br/>
    <button type="button" onclick="nativeMethod('JS调用原生方法-2');">JS调用原生方法—2</button>
    <br/>
    <br/>
    <button type="button" onclick="ContactInfo.nativeMethod();">JS与原生互相调用</button>
</body>
</html>